#include "mainwindow.h"

#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    //实现不同的级别 输出不同的颜色
    qSetMessagePattern("%{if-debug}[DBUG%{endif}"
                       "%{if-info}\033[32m[INFO%{endif}"
                       "%{if-warning}\033[33m[WARN%{endif}"
                       "%{if-critical}\033[31m[ERRO%{endif}"
                       "%{if-fatal}\033[35m[FATL%{endif}] "
                       "%{time yyyyMMdd h:mm:ss.zzz} "
                       "%{function}:%{line} - %{message}\033[0m");


    MainWindow w;
    w.show();
    return a.exec();
}
